package com.xlh.wjdcserver.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.common.result.Result;
import com.property.entity.Company;
import com.xlh.wjdcserver.service.CompanyService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private CompanyService companyService;

    @GetMapping("/companyList")
    @Operation(summary = "查询公司列表")
    public Result<List<Company>> companyList() {
        return Result.ok(companyService.list());
    }
}
